3.2.40 \(\int \frac {A+B \log (e (\frac {a+b x}{c+d x})^n)}{(a g+b g x)^2 (c i+d i x)} \, dx\) [140]

3.2.40.1 Optimal result
3.2.40.2 Mathematica [C] (verified)
3.2.40.3 Rubi [A] (verified)
3.2.40.4 Maple [A] (verified)
3.2.40.5 Fricas [A] (verification not implemented)
3.2.40.6 Sympy [F(-1)]
3.2.40.7 Maxima [B] (verification not implemented)
3.2.40.8 Giac [F]
3.2.40.9 Mupad [B] (verification not implemented)

3.2.40.1 Optimal result

Integrand size = 43, antiderivative size = 181 \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a g+b g x)^2 (c i+d i x)} \, dx=-\frac {b B n (c+d x)}{(b c-a d)^2 g^2 i (a+b x)}-\frac {b (c+d x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(b c-a d)^2 g^2 i (a+b x)}-\frac {d \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log \left (\frac {a+b x}{c+d x}\right )}{(b c-a d)^2 g^2 i}+\frac {B d n \log ^2\left (\frac {a+b x}{c+d x}\right )}{2 (b c-a d)^2 g^2 i} \]

output
-b*B*n*(d*x+c)/(-a*d+b*c)^2/g^2/i/(b*x+a)-b*(d*x+c)*(A+B*ln(e*((b*x+a)/(d* 
x+c))^n))/(-a*d+b*c)^2/g^2/i/(b*x+a)-d*(A+B*ln(e*((b*x+a)/(d*x+c))^n))*ln( 
(b*x+a)/(d*x+c))/(-a*d+b*c)^2/g^2/i+1/2*B*d*n*ln((b*x+a)/(d*x+c))^2/(-a*d+ 
b*c)^2/g^2/i
 
3.2.40.2 Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.

Time = 0.17 (sec) , antiderivative size = 304, normalized size of antiderivative = 1.68 \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a g+b g x)^2 (c i+d i x)} \, dx=-\frac {2 (b c-a d) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )+2 d (a+b x) \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )-2 d (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)+2 B n (b c-a d+d (a+b x) \log (a+b x)-d (a+b x) \log (c+d x))-B d n (a+b x) \left (\log (a+b x) \left (\log (a+b x)-2 \log \left (\frac {b (c+d x)}{b c-a d}\right )\right )-2 \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{-b c+a d}\right )\right )+B d n (a+b x) \left (\left (2 \log \left (\frac {d (a+b x)}{-b c+a d}\right )-\log (c+d x)\right ) \log (c+d x)+2 \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{b c-a d}\right )\right )}{2 (b c-a d)^2 g^2 i (a+b x)} \]

input
Integrate[(A + B*Log[e*((a + b*x)/(c + d*x))^n])/((a*g + b*g*x)^2*(c*i + d 
*i*x)),x]
 
output
-1/2*(2*(b*c - a*d)*(A + B*Log[e*((a + b*x)/(c + d*x))^n]) + 2*d*(a + b*x) 
*Log[a + b*x]*(A + B*Log[e*((a + b*x)/(c + d*x))^n]) - 2*d*(a + b*x)*(A + 
B*Log[e*((a + b*x)/(c + d*x))^n])*Log[c + d*x] + 2*B*n*(b*c - a*d + d*(a + 
 b*x)*Log[a + b*x] - d*(a + b*x)*Log[c + d*x]) - B*d*n*(a + b*x)*(Log[a + 
b*x]*(Log[a + b*x] - 2*Log[(b*(c + d*x))/(b*c - a*d)]) - 2*PolyLog[2, (d*( 
a + b*x))/(-(b*c) + a*d)]) + B*d*n*(a + b*x)*((2*Log[(d*(a + b*x))/(-(b*c) 
 + a*d)] - Log[c + d*x])*Log[c + d*x] + 2*PolyLog[2, (b*(c + d*x))/(b*c - 
a*d)]))/((b*c - a*d)^2*g^2*i*(a + b*x))
 
3.2.40.3 Rubi [A] (verified)

Time = 0.40 (sec) , antiderivative size = 134, normalized size of antiderivative = 0.74, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.116, Rules used = {2961, 2772, 25, 2010, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A}{(a g+b g x)^2 (c i+d i x)} \, dx\)

\(\Big \downarrow \) 2961

\(\displaystyle \frac {\int \frac {(c+d x)^2 \left (b-\frac {d (a+b x)}{c+d x}\right ) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(a+b x)^2}d\frac {a+b x}{c+d x}}{g^2 i (b c-a d)^2}\)

\(\Big \downarrow \) 2772

\(\displaystyle \frac {-B n \int -\frac {(c+d x)^2 \left (b+\frac {d (a+b x) \log \left (\frac {a+b x}{c+d x}\right )}{c+d x}\right )}{(a+b x)^2}d\frac {a+b x}{c+d x}-\frac {b (c+d x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{a+b x}-d \log \left (\frac {a+b x}{c+d x}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{g^2 i (b c-a d)^2}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {B n \int \frac {(c+d x)^2 \left (b+\frac {d (a+b x) \log \left (\frac {a+b x}{c+d x}\right )}{c+d x}\right )}{(a+b x)^2}d\frac {a+b x}{c+d x}-\frac {b (c+d x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{a+b x}-d \log \left (\frac {a+b x}{c+d x}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{g^2 i (b c-a d)^2}\)

\(\Big \downarrow \) 2010

\(\displaystyle \frac {B n \int \left (\frac {b (c+d x)^2}{(a+b x)^2}+\frac {d \log \left (\frac {a+b x}{c+d x}\right ) (c+d x)}{a+b x}\right )d\frac {a+b x}{c+d x}-\frac {b (c+d x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{a+b x}-d \log \left (\frac {a+b x}{c+d x}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{g^2 i (b c-a d)^2}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {-\frac {b (c+d x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{a+b x}-d \log \left (\frac {a+b x}{c+d x}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )+B n \left (\frac {1}{2} d \log ^2\left (\frac {a+b x}{c+d x}\right )-\frac {b (c+d x)}{a+b x}\right )}{g^2 i (b c-a d)^2}\)

input
Int[(A + B*Log[e*((a + b*x)/(c + d*x))^n])/((a*g + b*g*x)^2*(c*i + d*i*x)) 
,x]
 
output
(-((b*(c + d*x)*(A + B*Log[e*((a + b*x)/(c + d*x))^n]))/(a + b*x)) - d*(A 
+ B*Log[e*((a + b*x)/(c + d*x))^n])*Log[(a + b*x)/(c + d*x)] + B*n*(-((b*( 
c + d*x))/(a + b*x)) + (d*Log[(a + b*x)/(c + d*x)]^2)/2))/((b*c - a*d)^2*g 
^2*i)
 

3.2.40.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2010
Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x] 
, x] /; FreeQ[{c, m}, x] && SumQ[u] &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) 
+ (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]
 

rule 2772
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_ 
.))^(q_.), x_Symbol] :> With[{u = IntHide[x^m*(d + e*x^r)^q, x]}, Simp[(a + 
 b*Log[c*x^n])   u, x] - Simp[b*n   Int[SimplifyIntegrand[u/x, x], x], x]] 
/; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q 
, 1] && EqQ[m, -1])
 

rule 2961
Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*( 
B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m_.)*((h_.) + (i_.)*(x_))^(q_.), x_Symbol 
] :> Simp[(b*c - a*d)^(m + q + 1)*(g/b)^m*(i/d)^q   Subst[Int[x^m*((A + B*L 
og[e*x^n])^p/(b - d*x)^(m + q + 2)), x], x, (a + b*x)/(c + d*x)], x] /; Fre 
eQ[{a, b, c, d, e, f, g, h, i, A, B, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[ 
b*f - a*g, 0] && EqQ[d*h - c*i, 0] && IntegersQ[m, q]
 
3.2.40.4 Maple [A] (verified)

Time = 4.79 (sec) , antiderivative size = 269, normalized size of antiderivative = 1.49

method result size
parallelrisch \(-\frac {-2 B a \,b^{3} d^{3} n^{2}+2 B \,b^{4} c \,d^{2} n^{2}-2 A a \,b^{3} d^{3} n +2 A \,b^{4} c \,d^{2} n +B x \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )^{2} b^{4} d^{3}+2 A x \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) b^{4} d^{3}+B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )^{2} a \,b^{3} d^{3}+2 A \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) a \,b^{3} d^{3}+2 B x \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) b^{4} d^{3} n +2 B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) b^{4} c \,d^{2} n}{2 i \,g^{2} \left (b x +a \right ) n \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) b^{3} d^{2}}\) \(269\)

input
int((A+B*ln(e*((b*x+a)/(d*x+c))^n))/(b*g*x+a*g)^2/(d*i*x+c*i),x,method=_RE 
TURNVERBOSE)
 
output
-1/2*(-2*B*a*b^3*d^3*n^2+2*B*b^4*c*d^2*n^2-2*A*a*b^3*d^3*n+2*A*b^4*c*d^2*n 
+B*x*ln(e*((b*x+a)/(d*x+c))^n)^2*b^4*d^3+2*A*x*ln(e*((b*x+a)/(d*x+c))^n)*b 
^4*d^3+B*ln(e*((b*x+a)/(d*x+c))^n)^2*a*b^3*d^3+2*A*ln(e*((b*x+a)/(d*x+c))^ 
n)*a*b^3*d^3+2*B*x*ln(e*((b*x+a)/(d*x+c))^n)*b^4*d^3*n+2*B*ln(e*((b*x+a)/( 
d*x+c))^n)*b^4*c*d^2*n)/i/g^2/(b*x+a)/n/(a^2*d^2-2*a*b*c*d+b^2*c^2)/b^3/d^ 
2
 
3.2.40.5 Fricas [A] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 194, normalized size of antiderivative = 1.07 \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a g+b g x)^2 (c i+d i x)} \, dx=-\frac {2 \, A b c - 2 \, A a d + {\left (B b d n x + B a d n\right )} \log \left (\frac {b x + a}{d x + c}\right )^{2} + 2 \, {\left (B b c - B a d\right )} n + 2 \, {\left (B b c - B a d + {\left (B b d x + B a d\right )} \log \left (\frac {b x + a}{d x + c}\right )\right )} \log \left (e\right ) + 2 \, {\left (B b c n + A a d + {\left (B b d n + A b d\right )} x\right )} \log \left (\frac {b x + a}{d x + c}\right )}{2 \, {\left ({\left (b^{3} c^{2} - 2 \, a b^{2} c d + a^{2} b d^{2}\right )} g^{2} i x + {\left (a b^{2} c^{2} - 2 \, a^{2} b c d + a^{3} d^{2}\right )} g^{2} i\right )}} \]

input
integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))/(b*g*x+a*g)^2/(d*i*x+c*i),x, al 
gorithm="fricas")
 
output
-1/2*(2*A*b*c - 2*A*a*d + (B*b*d*n*x + B*a*d*n)*log((b*x + a)/(d*x + c))^2 
 + 2*(B*b*c - B*a*d)*n + 2*(B*b*c - B*a*d + (B*b*d*x + B*a*d)*log((b*x + a 
)/(d*x + c)))*log(e) + 2*(B*b*c*n + A*a*d + (B*b*d*n + A*b*d)*x)*log((b*x 
+ a)/(d*x + c)))/((b^3*c^2 - 2*a*b^2*c*d + a^2*b*d^2)*g^2*i*x + (a*b^2*c^2 
 - 2*a^2*b*c*d + a^3*d^2)*g^2*i)
 
3.2.40.6 Sympy [F(-1)]

Timed out. \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a g+b g x)^2 (c i+d i x)} \, dx=\text {Timed out} \]

input
integrate((A+B*ln(e*((b*x+a)/(d*x+c))**n))/(b*g*x+a*g)**2/(d*i*x+c*i),x)
 
output
Timed out
 
3.2.40.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 427 vs. \(2 (179) = 358\).

Time = 0.22 (sec) , antiderivative size = 427, normalized size of antiderivative = 2.36 \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a g+b g x)^2 (c i+d i x)} \, dx=-B {\left (\frac {1}{{\left (b^{2} c - a b d\right )} g^{2} i x + {\left (a b c - a^{2} d\right )} g^{2} i} + \frac {d \log \left (b x + a\right )}{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} g^{2} i} - \frac {d \log \left (d x + c\right )}{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} g^{2} i}\right )} \log \left (e {\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n}\right ) + \frac {{\left ({\left (b d x + a d\right )} \log \left (b x + a\right )^{2} + {\left (b d x + a d\right )} \log \left (d x + c\right )^{2} - 2 \, b c + 2 \, a d - 2 \, {\left (b d x + a d\right )} \log \left (b x + a\right ) + 2 \, {\left (b d x + a d - {\left (b d x + a d\right )} \log \left (b x + a\right )\right )} \log \left (d x + c\right )\right )} B n}{2 \, {\left (a b^{2} c^{2} g^{2} i - 2 \, a^{2} b c d g^{2} i + a^{3} d^{2} g^{2} i + {\left (b^{3} c^{2} g^{2} i - 2 \, a b^{2} c d g^{2} i + a^{2} b d^{2} g^{2} i\right )} x\right )}} - A {\left (\frac {1}{{\left (b^{2} c - a b d\right )} g^{2} i x + {\left (a b c - a^{2} d\right )} g^{2} i} + \frac {d \log \left (b x + a\right )}{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} g^{2} i} - \frac {d \log \left (d x + c\right )}{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} g^{2} i}\right )} \]

input
integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))/(b*g*x+a*g)^2/(d*i*x+c*i),x, al 
gorithm="maxima")
 
output
-B*(1/((b^2*c - a*b*d)*g^2*i*x + (a*b*c - a^2*d)*g^2*i) + d*log(b*x + a)/( 
(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*g^2*i) - d*log(d*x + c)/((b^2*c^2 - 2*a*b* 
c*d + a^2*d^2)*g^2*i))*log(e*(b*x/(d*x + c) + a/(d*x + c))^n) + 1/2*((b*d* 
x + a*d)*log(b*x + a)^2 + (b*d*x + a*d)*log(d*x + c)^2 - 2*b*c + 2*a*d - 2 
*(b*d*x + a*d)*log(b*x + a) + 2*(b*d*x + a*d - (b*d*x + a*d)*log(b*x + a)) 
*log(d*x + c))*B*n/(a*b^2*c^2*g^2*i - 2*a^2*b*c*d*g^2*i + a^3*d^2*g^2*i + 
(b^3*c^2*g^2*i - 2*a*b^2*c*d*g^2*i + a^2*b*d^2*g^2*i)*x) - A*(1/((b^2*c - 
a*b*d)*g^2*i*x + (a*b*c - a^2*d)*g^2*i) + d*log(b*x + a)/((b^2*c^2 - 2*a*b 
*c*d + a^2*d^2)*g^2*i) - d*log(d*x + c)/((b^2*c^2 - 2*a*b*c*d + a^2*d^2)*g 
^2*i))
 
3.2.40.8 Giac [F]

\[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a g+b g x)^2 (c i+d i x)} \, dx=\int { \frac {B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A}{{\left (b g x + a g\right )}^{2} {\left (d i x + c i\right )}} \,d x } \]

input
integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))/(b*g*x+a*g)^2/(d*i*x+c*i),x, al 
gorithm="giac")
 
output
integrate((B*log(e*((b*x + a)/(d*x + c))^n) + A)/((b*g*x + a*g)^2*(d*i*x + 
 c*i)), x)
 
3.2.40.9 Mupad [B] (verification not implemented)

Time = 2.80 (sec) , antiderivative size = 239, normalized size of antiderivative = 1.32 \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a g+b g x)^2 (c i+d i x)} \, dx=\frac {A}{g^2\,i\,\left (a\,d-b\,c\right )\,\left (a+b\,x\right )}+\frac {B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )}{g^2\,i\,\left (a\,d-b\,c\right )\,\left (a+b\,x\right )}+\frac {B\,n}{g^2\,i\,\left (a\,d-b\,c\right )\,\left (a+b\,x\right )}-\frac {B\,d\,{\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )}^2}{2\,g^2\,i\,n\,{\left (a\,d-b\,c\right )}^2}+\frac {A\,d\,\mathrm {atan}\left (\frac {a\,d\,1{}\mathrm {i}+b\,c\,1{}\mathrm {i}+b\,d\,x\,2{}\mathrm {i}}{a\,d-b\,c}\right )\,2{}\mathrm {i}}{g^2\,i\,{\left (a\,d-b\,c\right )}^2}+\frac {B\,d\,n\,\mathrm {atan}\left (\frac {a\,d\,1{}\mathrm {i}+b\,c\,1{}\mathrm {i}+b\,d\,x\,2{}\mathrm {i}}{a\,d-b\,c}\right )\,2{}\mathrm {i}}{g^2\,i\,{\left (a\,d-b\,c\right )}^2} \]

input
int((A + B*log(e*((a + b*x)/(c + d*x))^n))/((a*g + b*g*x)^2*(c*i + d*i*x)) 
,x)
 
output
A/(g^2*i*(a*d - b*c)*(a + b*x)) + (B*log(e*((a + b*x)/(c + d*x))^n))/(g^2* 
i*(a*d - b*c)*(a + b*x)) + (A*d*atan((a*d*1i + b*c*1i + b*d*x*2i)/(a*d - b 
*c))*2i)/(g^2*i*(a*d - b*c)^2) + (B*n)/(g^2*i*(a*d - b*c)*(a + b*x)) + (B* 
d*n*atan((a*d*1i + b*c*1i + b*d*x*2i)/(a*d - b*c))*2i)/(g^2*i*(a*d - b*c)^ 
2) - (B*d*log(e*((a + b*x)/(c + d*x))^n)^2)/(2*g^2*i*n*(a*d - b*c)^2)